how to prepare key in object dyamically javascript

137

how to prepare key in object dyamically javascript -

function resolve(path, obj) {
    return path.split('.').reduce(function(prev, curr) {
        return prev ? prev[curr] : null
    }, obj || self)
}

Comments

Submit
0 Comments